package net.lab0.tools.evo.iface;

import java.util.List;

/**
 * 
 * @author 116@lab0.net
 * 
 *         The interface an individual of the population has to implement.
 * @param <I>
 *            The class itself. Useful for a little hack.
 */

public interface Individual<I>
{
    /**
     * Mutates the genome of this individual.
     */
    public void mutate();
    
    /**
     * Crosses this individual with another individual and return a new individual as a result of this crossing.
     * 
     * @param other
     *            The other individual to do the crossing with. This other individual is guaranteed to be of the same
     *            type as this individual.
     * @return Several {@code Individual}s resulting of the crossing.
     */
    public List<I> cross(I other);
    
    /**
     * 
     * @return The fitness of this individual. As a convention: higher is better.
     */
    public double getFitness();
}
